﻿@model IEnumerable<MVC4_Test.Models.Question>
@{
    ViewBag.Title = "Home Page";
}
<script src="../../Scripts/jquery-1.7.1.js" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>

<div id="herobox">
    <div id="hero-content">
            <div id="close"><a title="click to minimize">_</a></div>
        <div id="blurb">
            Stack Overflow is a question and answer site for professional and enthusiast programmers. It&#39;s 100% free, no registration required.
            <br />
            <br />
            <a href="/home/about" id="tell-me-more" class="button">Take the 2-minute tour</a>
        </div>
        <div id="desc">
            <b>Here&#39;s how it works:</b>
            <ol id="hiw">
                <li id="q">Anybody can ask a question
                </li>
                <li id="an">Anybody can answer
                </li>
                <li id="b">The best answers are voted up and rise to the top
                </li>
            </ol>
        </div>
        <div style="clear: both"></div>
    </div>
    <script>
        $('#herobox li').click(function () {
            StackExchange.using("gps", function () {
                StackExchange.gps.track("aboutpage.click", { aboutclick_location: "hero" }, true);
            });

            window.location.href = '/about';
        });
        $('#tell-me-more').click(function () {
            StackExchange.using("gps", function () {
                StackExchange.gps.track("aboutpage.click", { aboutclick_location: "hero" }, true);
            });
        });
        $('#herobox #close').click(function () {
            StackExchange.using("gps", function () {
                StackExchange.gps.track("hero.action", { hero_action_type: "minimize" }, true);
            });
            $.cookie("hero", "mini", { path: "/" });
            $.ajax({
                url: "/hero-mini",
                success: function (data) {
                    $("#herobox").fadeOut("fast", function () {
                        $("#herobox").replaceWith(data);
                        $("#herobox-mini").fadeIn("fast");
                    });
                }
            });
            return false;
        });
    </script>
</div>


<div id="mainbar">


    <div class="subheader">
        <h1 id="h-top-questions">
                Top Questions
        </h1>

        <div id="tabs">
        <a class="youarehere" href="?tab=interesting" title="Questions that may be of interest to you based on your history and tag preference">interesting</a>
        <a href="?tab=featured" title="Questions with an active bounty">                <span class="bounty-indicator-tab">432</span> 
featured</a>
        <a href="?tab=hot" title="Questions with the most views, answers, and votes over the last few days">hot</a>
        <a href="?tab=week" title="Questions with the most views, answers, and votes this week">week</a>
        <a href="?tab=month" title="Questions with the most views, answers, and votes this month">month</a>
</div>
    </div>


<div id="qlist-wrapper">
    <div id="question-mini-list">
        
@foreach (var item in Model)
{
    <div class="question-summary narrow" id="question-summary-21939135" >
        
        <div onclick="window.location.href='@Url.Action("Show", "Question", new { id = item.QuestionId })" class="cp">    
          
                <!--  Votes -->
                <div class="votes">
                    <div class="mini-counts">@item.View</div>
                    <div>votes</div>
                </div>
                <!-- End Votes -->

            <!-- Answered -->
            <div class="status unanswered">
                <div class="mini-counts">@item.View</div>
                <div>answers</div>
            </div>
            <!-- End Answered -->

            <!-- Views -->
            <div class="views">
                <div class="mini-counts">@item.View</div>
                <div>views</div>
            </div>
            <!-- End Views -->
        </div>

        <div class="summary">

            <!--- Question Title -->
            <h3>@Html.ActionLink(item.Title, "Show", "Question", new { id = item.QuestionId}, new { @class="question-hyperlink", title=item.Title}) <!-- <a href="#" class="question-hyperlink" title="@item.Title">@item.Title</a> --></h3>
            <!--- END Question Title -->

            <!-- Tags -->
            <div class="tags t-python t-numpy t-compiler-errors t-cython">
            @foreach (var tag in item.QuestionTag.ToList())
            {
               @Html.ActionLink(tag.Tag.Text, "Tagged", "Question", new { id = tag.TagId}, new { @class = "post-tag", title = tag.Tag.Text, rel = "tag" })
            }
            </div>
            <!-- End Tags -->
            <!-- Starter Info -->
            <div class="started">
                <a href="/questions/21939135/cython-compilation-error-local-variable-referenced-before-assignment" class="started-link"><span title="2014-02-21 16:45:50Z" class="relativetime">1h ago</span></a>
                <a href="/users/1150712/zhangxaochen">zhangxaochen</a> <span class="reputation-score" title="reputation score " dir="ltr">3,676</span>
            </div>
            <!-- End Start Info-->

        </div>
    </div>
}
    </div>
</div>


    <h2 class="bottom-notice">Looking for more? Browse the <a href="/questions">complete list of questions</a>, or <a href="/tags">popular tags</a>. Help us answer <a href="/unanswered">unanswered questions</a>.</h2>
</div>